import random as r

class Fish:
    def __init__(self):
        self.x = r.randint(0,10)
        self.y = r.randint(0,10)

    def move(self):
        new_x = self.x + r.choice([1,-1])
        new_y = self.y + r.choice([1,-2])
        if new_x < 0:
            self.x =  -new_x
        elif new_x > 10:
            self.x = 10-(new_x-10)
        else :
            self.x=new_x

        if new_y < 0:
            self.y =  -new_y
        elif new_y > 10:
            self.y = 10-(new_y-10)
        else :
            self.y=new_y

class Goldfishi(Fish):
    pass

class Liyu(Fish):
    pass
class Shayu(Fish):
    def __init__(self):
        super().__init__()
        self.hg = True

    def eat(self):
        if self.hg :
            print('我吃！')
            self.hg = False
        else :
            print('吃不下了')
